From: Florian Müllner Date: Tue, 11 Feb 2014 14:40:47 +0000 (+0100) Subject: Revert "appDisplay: Special case terminal launching" X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2795 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=812a61939e2d06d2fc793f605d067ffac2aa0b28;p=gnome-shell.git Revert "appDisplay: Special case terminal launching" Having terminal launchers behave differently than any other launchers is non-obvious and confusing. Remove the special-casing to restore consistency, we will make the new window action more accessible instead. This reverts commit 68faba6bde08a8898941, 4ed0f3e5f0f9d2f7 and 887a21afb97aaa35. https://bugzilla.gnome.org/show_bug.cgi?id=695010 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index f23d054ad..4af4198e0 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -46,21 +46,6 @@ const INDICATORS_ANIMATION_MAX_TIME = 0.75; const PAGE_SWITCH_TRESHOLD = 0.2; const PAGE_SWITCH_TIME = 0.3; -function _getCategories(info) { - let categoriesStr = info.get_categories(); - if (!categoriesStr) - return []; - return categoriesStr.split(';'); -} - -function _isTerminal(app) { - let info = app.get_app_info(); - if (!info) - return false; - let categories = _getCategories(info); - return categories.indexOf('TerminalEmulator') > -1; -} - function _listsIntersect(a, b) { for (let itemA of a) if (b.indexOf(itemA) >= 0) @@ -888,7 +873,7 @@ const AppSearchProvider = new Lang.Class({ let app = this._appSys.lookup_app(result); let event = Clutter.get_current_event(); let modifiers = event ? event.get_state() : 0; - let openNewWindow = (modifiers & Clutter.ModifierType.CONTROL_MASK) || _isTerminal(app); + let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK; if (openNewWindow) app.open_new_window(-1); @@ -1466,9 +1451,8 @@ const AppIcon = new Lang.Class({ _onActivate: function (event) { let modifiers = event.get_state(); - if ((modifiers & Clutter.ModifierType.CONTROL_MASK - && this.app.state == Shell.AppState.RUNNING) - || _isTerminal(this.app)) { + if (modifiers & Clutter.ModifierType.CONTROL_MASK + && this.app.state == Shell.AppState.RUNNING) { this.app.open_new_window(-1); } else { this.app.activate();